﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DAL;

namespace BLL
{
    public class LocationHandler
    {
        // Handle to the Location DBAccess class
        LocationDBAccess objLocation = null;

        public LocationHandler() {
            objLocation = new LocationDBAccess();
        }

        public List<Location> GetLocationList(String CONNECTION_STRING)
        {
            return objLocation.GetLocationList(CONNECTION_STRING);
        }

        public Location GetLocationDetails(string LocationID, String CONNECTION_STRING)
        {
            return objLocation.GetLocationDetails(LocationID, CONNECTION_STRING);
        }

        public bool DeleteLocation(int LocationID, String CONNECTION_STRING)
        {
            return objLocation.DeleteLocation(LocationID, CONNECTION_STRING);
        }

        public bool UpdateLocation(Location obj, String CONNECTION_STRING)
        {
            return objLocation.UpdateLocation(obj, CONNECTION_STRING);
        }

        public bool AddNewLocation(Location obj, String CONNECTION_STRING)
        {
            return objLocation.AddNewLocation(obj, CONNECTION_STRING);
        }

    }
}
